package com.cloudfun.campusshare.common.model.vo;

import com.cloudfun.campusshare.common.constant.ApplicationResult;
import com.cloudfun.campusshare.common.constant.KjtAuditStatus;
import com.cloudfun.campusshare.common.constant.MerchantType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class MerchantVo {
    private String id;
    @ApiModelProperty(value = "运营商名称")
    private String userName;
    @ApiModelProperty(value = "商户类型")
    private MerchantType merchantType;
    @ApiModelProperty(value = "提交时间")
    private String createTime;
    @ApiModelProperty(value = "企业名称")
    private String orgName;
    @ApiModelProperty(value = "统一社会信用代码")
    private String socialCode;
    @ApiModelProperty(value = "审核状态")
    private ApplicationResult auditStatus;
    @ApiModelProperty(value = "快捷通审核状态")
    private KjtAuditStatus kjtAuditStatus;

    @ApiModelProperty(value = "用户id")
    private String userId;

    public void setAuditStatus(String auditStatus) {
        if (auditStatus == null) {
            return;
        }
        this.auditStatus = Enum.valueOf(ApplicationResult.class, auditStatus);
    }

    public void setKjtAuditStatus(String kjtAuditStatus) {
        if (kjtAuditStatus == null) {
            this.kjtAuditStatus=KjtAuditStatus.D;
            return;
        }
        this.kjtAuditStatus = Enum.valueOf(KjtAuditStatus.class, kjtAuditStatus);
    }

    public void setMerchantType(String merchantType) {
        if (merchantType == null) {
            this.kjtAuditStatus=null;
            return;
        }
        this.merchantType = Enum.valueOf(MerchantType.class, merchantType);
    }
}
